﻿@using Microsoft.AspNet.Identity;
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewBag.Title - My ASP.NET Application</title>
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")
    @Styles.Render("~/Content/kendo")
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/kendo")
    @RenderSection("JavaScript", required: false)

</head>
<body>
    <div class="navbar  navbar-fixed-top">
        <div class="navbar-inner">
            <div class="container">
                <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <div class="brand"><a href="../../Home" style="text-decoration:none; color:#0094ff">Weather forecast</a></div>
                <div class="nav-collapse collapse">
                    <ul class="nav" id="main-menu">
                        <li>@Html.ActionLink("Home", "Index", "Home", new { area = "" }, null)</li>
                        <li>@Html.ActionLink("All authors", "AllAuthors", "Authors", new { area = "" }, null)</li>
                        @if (User.IsInRole("Author"))
                        {
                            <li>@Html.ActionLink("My Forecasts", "AuthorDetails", "Authors", new { area = "", username = User.Identity.GetUserName() }, null)</li>
                        }
                        @if (User.IsInRole("Author"))
                        {
                            <li>@Html.ActionLink("Admin", "Index", "Start", new { area = "Administration" }, null)
                                <ul>
                                    <li>@Html.ActionLink("Towns", "Index", "Towns", new { area = "Administration" }, null)</li>
                                    <li>@Html.ActionLink("Areas", "Index", "Areas", new { area = "Administration" }, null)</li>
                                    <li>@Html.ActionLink("Users", "Index", "ExtendedUsers", new { area = "Administration" }, null)</li>
                                </ul>
                            </li>
                        }
                    </ul>
                    @Html.Partial("_LoginPartial")
                </div>
            </div>
        </div>
    </div>
    <div class="container">
        @RenderBody()
        <hr />
        <footer>
            <p>&copy; @DateTime.Now.Year - Pixies Weather Forecast</p>
        </footer>
    </div>

    <script>
        $('#main-menu').kendoMenu();
    </script>

    @Scripts.Render("~/bundles/bootstrap")
    @RenderSection("scripts", required: false)
</body>
</html>
